package com.zzb.weixin.model.datacube;

import java.util.Date;

import com.zzb.util.DateUtil;
import com.zzb.weixin.constant.WXJsonName;
import com.zzb.weixin.json.JsonObject;
/**
 * 接口用提交数据结构
 * {
 * "begin_date": "2014-12-07", 
 * "end_date": "2014-12-07"
 * }
 * @author user
 *
 */
public class DatacubeDate {
	private Date beginDate;
	private Date endDate;
	public JsonObject toJson(){
		JsonObject jo = new JsonObject();
		jo.put(WXJsonName.BEGIN_DATE, DateUtil.getStringFromDateAsMask(DateUtil.YYYYMMDD, beginDate));
		jo.put(WXJsonName.END_DATE, DateUtil.getStringFromDateAsMask(DateUtil.YYYYMMDD, endDate));
		return jo;
	}
	public Date getBeginDate() {
		return beginDate;
	}
	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
}
